package com.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class SpringAnnotation {
	@RequestMapping("/hello")
	public ModelAndView hello(HttpServletRequest req,HttpServletResponse rep){
		ModelAndView mv=new ModelAndView();
		mv.addObject("msg", "Hello SpringMVC Annotation");
		mv.setViewName("hello");
		System.out.println("123");
		return mv;
	}
}
